home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
archive
/
zdiff20b.arj
/
ZDIFF.DOC
< prev
next >
Wrap
Text File
|
1994-03-08
|
31KB
|
714 lines
ZDIFF v2.00
The Archive/Directory comparison
Shareware program
Copyright 1994, Christophe Dubourg
Date : 08 March 1994
---*---
Table of contents
1 ........................Purpose
2 ........................ Syntax
3 ............... Using interface
4 ...................... Features
5 .................. How it works
6 .................. Requirements
7 ........................ Limits
8 ....................... Remarks
9 .................... Disclaimer
10 ............ Distribution files
11 ............Registration/Author
12 .....You are french ? read this
---*---
1. Purpose :
------------
ZDiff is a comparison utility program.
You can compare a pair of archives, or a pair of directories, or
an archive and a directory. (that's the new of this !)
The result is a sorted list, showing the status of each file.
(or pair of files)
■ ZDIFF.EXE is the normal DOS version.
■ ZDIFFD.EXE is the DPMI hosted version. (if you registered 4 that)
It permits a larger amount of files to be treated (up to 16380)
and works with Windows or any other DPMI host. (like Borland's)
2. Syntax :
-----------
ZDIFF <New Archive/Directory/List> <Old Archive/Directory/List>
or
ZDIFF <New Arc/Dir/List> <Old Arc/Dir/List> [options] [wildcards]
Note : To simplify the following, the archive or directory that
is compared to an other archive or directory will be called a
Set of files. There is a NEW set of files, and an OLD set of
files. (to determine the one that is Newer and the one that is
Older, for instance).
The <New archive/directory> and <Old archive/directory>
parameters are needed (not optional).
The order in which you specify the New/Old pair is important.
It will make the difference between a 'Deleted' file or
'Inserted' file, or a 'Newer' and 'Older', or 'Bigger' and
'Smaller'. (globally, it will determine the output result)
To specify that a set of files is a LIST (not an archive or a
directory), just add an '@' in front of the LIST filename.
Like this : ZDIFF @MyList.LST MyNewDir /R
This way, I compare MYLIST.LST (which is a list), and MYNEWDIR
(which is a directory)
The NEW set of files must be specified first.
---------------------------------------------
Then, you may specify wildcards if you need.
a. Wildcards
The wildcards may be used to restrict the files compared inside
the directory or archive. (for both the new and old sets,
because it would be unlogical to have two different wildcards).
The DOS standard wildcards are allowed. Note : wildcards are not
used in LISTs.
b. Options
The options may be specified anywhere on the command line, and
are not case sensitive. The options are :
/a : Automatic mode.
By default, once the files have been read, the result of
comparison is shown in a window, on screen, and you can browse
through the whole output, using dialogs to specify such things
as filters, video options, save options, and so on.
In Automatic mode, ZDiff output the result to standard output,
and immediatly exits, without any user action.
This allow the use of ZDiff in batch files.
Example : You can use 'ZDIFF FILE.ZIP C:\DATA /A >PRN' to
directly send the result to printer.
/b : Batch output.
Only the file names are sent to standard output.
You may re-use the list as input with an other program.
(to update an archive with new files, or delete files that are
already in an archive or on a backup disk, for example)
/c : Country flag override.
If the dates in the ZIP files are not well recognized, you may
use this option to force the date format to use while reading
ZIP files :
/C0 - USA date format. (MM/DD/YY)
/C1 - EUROPEAN date format. (DD/MM/YY)
/C2 - JAPANESE date format. (YY/MM/DD)
/d : Differences only.
Once the two sets of files are compared, the output will only
show the files that are different between the 2 sets. (ANY
difference : date, size, crc, name...)
By default, all the files of the two sets are displayed.
This is equivalent to /X= (Exclude Equals)
/h : Help !
This display help screens, and an information screen.
/i : Ignore Filter
You can ignore the differences matching certain criterias.
These criteria must immediately follow the /X switch.
The letters that can be used are (in any order) :
c - Ignore the CRC differences.
d - Ignore Date differences.
s - Ignore Size differences.
An example : ZDIFF NEWFILE.ARJ C:\DATA /id
The output will ignore date difference in comparisons.
(/id = Ignore Date differences)
/l : Generate a list.
With this option turned on, you don't compare two sets of files,
you just generate a list from ONE set of files, that can later
be used to compare with... an other listing, or an other set of
files. This allows you to gain a lot of time if you want to
compare one set of files with several sets of files. (ZDiff,
when using a list, don't have to scan a disk for names, sizes,
dates, and CRC so it's incredibly FAST !)
When you generate a list, ZDiff try to obtain the maximum
informations from the source files.
You can specify a label name for the list, which will be
included in the output file. This is for information only.
If you don't specify any label, the default label will be the
volume label if the source is a directory, the archive name if
it's an archive, or the first label of the list if it's a
previously saved list.
If the source is a directory, both 16-bit and 32-bit CRC are
calculated and displayed in the output list. This allows you to
later either compare with a 16-bit CRC archiver output, or a
32-bit CRC one. If the source is an archive, only the CRC used
by the unarchiver output can be obtained and sent to the list
output. As usual, the display is sent to standard output, so to
save the list, just re-direct it, like this :
ZDIFF EXAMPLES /L >EXAMPLES.LST
or ZDIFF MYSAMPLES.ARJ /L >SAMPLSET.1
or ZDIFF /LMyLabel DUMM.ZOO >DIR1.LST
The first example outputs a list from the EXAMPLES directory,
calculating both 16 and 32-bit CRC, to EXAMPLES.LST.
The second example outputs a list of the files contained in
MYSAMPLES.ARJ - the CRC is 32-bit, since ARJ use 32-bit CRC.
The third example outputs a list from DUMM.ZOO, which use the
16-bit CRC. "MyLabel" will be the label of this list.
/m : Matching files only.
The output will only show the files that are BOTH in the NEW and
the OLD set of files. Files that are only in the NEW set or only
in the OLD set (i.e., Deleted or Inserted files) will not be
shown. Useful if you want to compare a set which is only a
subset of the other.
This is equivalent to /Xid (eXclude Inserted and Deleted)
/n : No Path in names
With this option, you can compare a full directory tree with a
single directory. Useful to compare a ZIP file that have a
directory tree stored inside of it, and a directory that
contains all the files without subdirectories.
Note : use this option with caution, since the path is barely
stripped from each name. If two files have the same name in
two different directories, the latest files updates the data
from the previous one.
Example : to compare two directories, one containing the 'cut'
product, and one containing the 'development' version, like :
New directory : BUILD\*.*
Old directory : CUT\DISK1\*.*
CUT\DISK2\*.*
CUT\DISK3\*.* etc...
You can compare these 2 directories with the following command :
ZDIFF /r /n BUILD CUT
/p : Pause.
With this option, ZDiff will prompt you before reading each set
of file. The purpose of this is essentially while using
floppies, or removeable media.
For example, if you need to compare two sets that are on two
different floppies that have the same format, you'll have to
insert one disk, read the files from it, and then the second
disk. Maybe, you could compare 2 removable hard disks, or a hard
disk and an archive, or whatever you want.
/q : Quick scan.
If a directory is involved in comparison, this permits to skip
the CRC calculation on each file of this directory, in order to
speed up the process. Of course, use this option with caution,
since the comparison is then only made with TimeStamp and Size !
(two files can have the same date and time of last modification,
the same size, and be binary different : using this option, they
will be marked as 'Same'). However, if the timestamp or size is
different, 'Differs' will be displayed.
/r : Recurse directories.
By default, the subdirectories are not searched, either in the
archive or the directory file structure. (to save time). This
switch allows the comparison of the full tree of directories.
Note : if you don't specify the -r option, the filenames that
contains a path in the archives are not treated at all. A
warning is displayed if a path is found in an archive, if you
have not used the -r option.
/v : Verbose output.
This option causes a status to be output at the end of comparison.
This status report shows the number of files that are :
- Identical
- Different
- Newer
- Older
- Bigger
- Smaller
- Inserted
- Deleted
It may give an idea of the amount of differences between the two
sets, without having to analyze the whole output.
/x : eXclude filter.
You can exclude from output the files that match a certain
criteria. These criteria must immediatly follow the /X switch.
The letters that can be used are (in any order) :
i - exclude Inserted files.
d - exclude Deleted files.
n - exclude Newer files.
o - exclude Older files.
b - exclude Bigger files.
s - exclude Smaller files.
c - exclude CRC different files.
= - exclude Identical files.
An example :
ZDIFF NEWFILE.ZIP C:\DATA /X=o
Exclude from output the files that are Equals, and the Older
files, too.
/z : Zpecial messages. (troubleshooting option)
Troubleshooting mode option - display more information while
running, like Country code detected, date used, Zip version...
It may help if something seems to go wrong (with date format
detection, for example). Please note that using the DPMI version
of ZDiff with the Borland RTM DPMI server, the Country Code
number MAY be inaccurate. However this doesn't affect the DATE
FORMAT detection. (See the /C option to override the Date format
detection)
3. Using the user interface
---------------------------
Once all the files have been read in memory, the output is
shown in a scrolling window, on screen, with colors that show
where the differences are.
Each color have a signification. Use Alt-L (or /Help|Legend in
the menu) to obtain the reference (legend) of colors.
- White on blue represent 'No difference'.
- White on Red represent 'CRC difference'.
- White on Magenta represent 'Date newer' or 'Size bigger'.
- White on Cyan represent 'Date older' or 'Size smaller'.
- Yellow on blue represent 'Inserted' files.
- Red on blue represent 'Deleted' files.
Here are the menu options :
File|Save : Saves the output to a text file, either
Side-by-side or Single column (See Options|Misc)
If /L specified on command line, it saves the file as a list.
otherwise, it saves a diff file.
File|Exit : Quits ZDiff, back to DOS.
Options|Filters : show a dialog box to let you specify the
different filtering options, (Exclude and Ignore) and where
these filters apply (to screen only, or Saved file also).
These options match by default the command line options,
if you have specified some.
Options|Misc : at this time, you can only specify how you want
the saved file output to be. (single or side-by-side)
Options|Toggle video : toggle between 25 and 43/50 lines screen.
Options|Toggle directory : toggle between side-by-side output
(the directory information is still shown on the extreme right,
just scroll to the right to see it), and Single column output
(the names and directories fit on the whole screen)
Help|Arguments : brings a serie of dialogs explaining the use
of ZDiff. (equivalent to /H on the command line).
Help|Legend : brings a dialog explaining the meaning of each
color.
Help|Register : information for registration of ZDiff.
Help|About : Version information, and registration information.
4. Features :
-------------
Since this is a comparison program, you will probably want to know
how it compares the two sets of files :
The keys of comparison are :
Name : If two names of the sets don't match, either one is new or one is
deleted, depending on the order you specified for the comparison.
if the -r option is specified, the full filename must match.
Once two files are found in both the 2 sets, a more precise
comparison occurs. The keys for comparison between two files that
have the same name are :
CRC : The most accurate CRC method is used to know if files are absolutely
identical or not.
CRC is either taken from the archive, or calculated from the files
in the case of a directory. 32-bit CRC is the default.
Note : if one of the sets is an archive of type LZH, LHA, ARC or
ZOO, then a 16-bit calculation is done on files, to match the CRC
that these archives use.
-> If you compare one archive which use 16-bit CRC and an other
which use 32-bit CRC, then they can't match : the Quick mode is
then automatically set to ON. (CRC are not compared). In this
case, the only way to compare these archives with a CRC is to
extract one of them to a directory, and then compare this
directory to the unextracted archive.
If the Quick option is set, and at least one of the 2 sets is a
directory, no CRC calculation occurs, and files are assumed binary
identical.
Date : To know which one is the oldest file, or the newest.
(Time is used, too)
Size : To know which one is the biggest file, or the smallest.
5. How it works
---------------
To compare two directories, or a directory and a saved list, or
two lists, you won't need nothing but ZDIFF.EXE.
But to compare two archives, or an archive and a directory,
you'll need the correct unarchiver in your PATH, to access the
archives you have specified.
The program supports all the current archive formats that are
commonly used and that I am aware of :
ZIP, ARJ, LHA, LZH, PAK, ZOO, ARC.
The needed unarchiver, for each extension is :
*.ZIP PKUNZIP.EXE (v1.10 or v2.04+)
*.ARJ ARJ.EXE (v2.30)
*.LHA \
*.LZH - LHA.EXE (v2.12)
*.PAK /
*.ZOO ZOO.EXE (v2.1)
*.ARC PKUNPAK.EXE (v3.61)
(each of these can be easily found on many BBS or Compuserve)
Now, here is how ZDiff works :
The program first checks if the archive or directory or list
that you specified exists. (to prevent an error after some
precious seconds of calculation). At this point, it decides if a
32-bit or 16-bit calculation will occur (or no crc, if Quick
mode is set). Then, it analyzes the NEW set, and then the OLD
set.
Three choices, concerning each set of file :
a. If it's an archive:
The unarchiver is called, to obtain a list of each file in the
archive, along with the date, crc, size, and so on.
This list is saved in a temporary file.
(Using the TEMP environment variable if available)
Then, the temporary file is opened, and scanned for each file in
it. Since all the informations are already calculated by the
unarchiver, there's nothing to compute (the crc is already
there).
Each file entry is then compared or stored to a list in memory.
b. If it's a directory:
The directory is scanned, and all the files are opened, to
obtain their date, time, size, and a CRC calculation occurs.
(except if the Quick mode is set). Each file entry is then
treated like archive files entries.
c. If it's a list:
The list is opened, and scanned like an archiver output. The
only difference is that since BOTH the 16 and 32 bits CRC can be
presents, the CRC choosen is the one that correspond the best to
the other set of file to compare to. (the most accurate is
always taken) Each file entry is then treated like archives file
entries.
After all the files have been read in memory (the NEW set and
the OLD set of files), the sorted list is sent to standard
output. Since you can redirect standard output, you could use
this facility to pipe the output to a finder program (FIND,
GREP), or a viewer program (VIEW, LIST), or any filter program
of your choice.
Here are some examples :
1. ZDIFF NEWARC.ZIP OLDARC.ARJ | more
This outputs the result of the comparison via the DOS's
MORE filter command.
(if the archive contains sub-dirs, they are not included,
since no -r parameter is there - instead, you'll obtain a
warning while running ZDiff).
2. ZDIFF /r NEWARC.ZIP OLDDIR *.DOC | FIND "Newer" | LIST /s
This displays, via the LIST full-screen viewer, all the NEW
files in NEWARC.ZIP, compared to the OLDDIR directory files.
Subdirectories are scanned, too. Only the .DOC files are
processed.
3. ZDIFF NEWZIP.ZIP . -r -q -c1
This outputs on screen the differences between the archive
NEWZIP.ZIP and the current directory. The subdirectories are
scanned, too, (-r) both in the archive and the directory.
A Quick scan (-q) of directories files will be made (no
CRC), so the comparison will be based on date, time and size
only. The date format used by PKUNZIP on this machine (-c1)
is the EUROPEAN date format (DD/MM/YY).
4. ZDIFF -v . -r OLDARC.LHA /d /q -m
This output on screen the differences between the current
directory and the archive OLDARC.LHA. Subdirs (-r) are
scanned also. A Verbose (-v) status is displayed at end of
comparison. Only the differences are shown (/d), and no CRC
is calculated (/q). Only the matching files (-m) of the two
sets are displayed.
5. ZDIFF -L \BIN >MASTER.LST
This outputs in MASTER.LST the list of files in the \BIN
directory, along with their date, time, 16-bit and 32-bit
CRC, and size. For later comparison purpose.
6. ZDIFF LATEST.ZIP @MASTER.LST -d
This outputs the differences between the latest product zipped
in LATEST.ZIP, and the master list generated by the previous
example.
6. Requirements :
----------------
ZDiff is compiled for 80286 and above systems.
DOS version : a minimum of 300kb is required.
You need a color adapter, if you want to browse the results on
screen. (otherwise you can still output to an ASCII file).
DPMI version : 2MB or more memory would be good.
You need a DPMI host, of course. (Windows, for instance).
Optional : a mouse !
7. Limits :
-----------
■ ZDIFF.EXE :
All the files informations are stored in DOS memory. (no EMS) It
allows between about 5500 to 9900 files to be stored, depending
on the path lengths and your available system memory - this is
much enough for everyday use, I guess.
■ ZDIFFD.EXE :
All the files informations are stored in the GLOBAL memory.
(DPMI) So, you can virtually store as many files that you have
memory free, up to 16380 files at one time in memory.
You need Windows or any other DPMI host, like Borland's DOS RTM.
Note : Borland DOS DPMI host can be found on Compuserve : GO
BORFORUMS, then go to 'Borland Pascal forum'. Then, choose the
'From Borland' library section, and download the file called
NEWRTM.ZIP.
■ Note concerning the archives : if the -r option is not
specified, the files containing a path in their name are not
included in the comparison. Only the files in the main directory
of the archive are treated, and only the files in the specified
directory are treated also.
However, a warning is displayed if a directory path is found in
an archive, and if you haven't specified the -r option.
■ Note concerning the LISTS generated by ZDiff : you can't use
wildcards if a list is used in a comparison.
-> But you can use wildcards to generate a list.
8. Remarks
----------
I made my possible to make this program free of bugs, but if
ever something is wrong with ZDIFF, tell me. I'll fix it ASAP.
ZDiff is written in Pascal and Assembly, compiled using
Borland Pascal 7.01, (for DOS and DPMI targets), with
Turbo Vision.
Please notice that ZDiff supports international information from
DOS, since PKUNZIP does. (it concerns the date format, used for
date comparison, that is different in US and in France, for
instance). The DOS Country information is read for this purpose.
The 3 date formats that exists are USA, European and Japanese.
If ever the comparison of dates seems to be wrong in ZDiff, you
can override (with the /C option) the automatic detection to set
a date format to use on your machine. See the 'Syntax' section.
Note : if you use the /Z option to display technical
information, the country information reported by ZDIFFD.EXE (the
DPMI hosted version) may be inaccurate, if you use the Borland
DPMI RTM ; The date format, however, will be correctly detected
and used.
The correct country number will be correctly obtained, running
ZDIFFD under Windows DPMI. Note : The country number is for
information only. Don't worry if it's wrong. Just check that the
date format displayed match your PKUNZIP outputs.
Since ZDiff writes a few temporary data on your hard disk (in
your temp directory), you should not reboot while ZDiff is
running, as this could result in lost sectors. (CHKDSK /F would
corrects it anyway) Just use Ctrl-Break if you want to abort the
program.
9. Disclaimer
-------------
Even if there is really no possibility for this program to
damage your data, here is the usual disclaimer message :
As a shareware program, ZDIFF is distributed as-is.
The author disclaims all warranties, expressed or implied.
The author will assume no liability for damages either from the
direct use of this product or as a consequence of it's use.
PKUNZIP, PKUNPAK, ZIP, ARJ, ZOO, PAK, LZH, LHARC, LHA are
copyrighted by their respective authors. Borland Pascal and
Turbo Vision are Copyright Borland International.
10. Distribution files
----------------------
Here is the file distribution list :
Length CRC-32 Name Description
------ -------- ------------ -------------------
3581 5aa71e84 WHATSNEW.DOC News in version 2.0
160174 27ce3913 ZDIFF.EXE The std DOS program
30668 N/A ZDIFF.DOC You read it!
1766 4bae569b REGISTER.DOC Registration form
372 424ed9ee FILE_ID.DIZ Short description
------ -------- ------------ -------------------
11. Registration / author
-------------------------
If you like this program, and plan to use it, you may try it
during a 21 days period, after what you should register.
I make many tools for my own professionnal use, (this one
helps me a lot!) and it would be very pleasant to me, to know
that these tools are useful for someone else, too !
If you register, it will be a proof that my tools are useful :
in this case, I'll spend more time to update them, and adding
features - according to your requests or suggestions.
The registration fee is $15 for a single user. (cash, please)
(You are french? go to section 12 below).
For $5 more, I'll send you ZDIFFD.EXE, which is the DPMI hosted
version of ZDiff; allows more files to compare. For multi-user
registration, please look at the REGISTER.DOC form included in
the ZDiff package. I made this registration form for your
convenience ; you can print it, fill-in the blank fields, and
send it to me along with your bank note(s), or check.
Please note that a check cost $30 to me, so don't send a check
for less than $100 (I live in France).
The unregistered version of ZDiff is limited to a certain
amount of files... Much enough to work and have a good idea of
its possibilities. Please register to override this (small!)
limitation.
** Thanks in advance. **
-------------------------------------------------
HERE IS MY ADDRESS Christophe Dubourg
FOR (paper) MAIL, 23, rue Victor Hugo
CHECKS, or 78370 PLAISIR
CASH : FRANCE
-------------------------------------------------
--> Even if you don't send money, please feel free to send me your
remarks, suggestions, and specific problems encountered with
this program.
It will be a pleasure to read your mail and to answer it !
Don't hesitate to contact me, at the following addresses :
(in order of preference)
---------------------------------------------------------------
Compuserve : 73233,1412 (Christophe Dubourg)
or 73233,1412@compuserve.com
(Forum : IBMSYS)
At home (paper Mail) : Christophe Dubourg
23, rue Victor Hugo
78370 PLAISIR
FRANCE
Internet : cdubourg@borland.com
or 73233,1412@compuserve.com
---------------------------------------------------------------
Thanks for using ZDiff, I hope it helps. //ChD
12. You are french ? read this
-------------------------------
Vous êtes français ? très bien. Cette section n'est ici que pour
vous inviter à vous enregistrer avec de la monnaie un peu plus
pratique que le dollar. J'ai fixé le prix minimum de ZDiff à 80FF,
plus 30FF pour la version DPMI.
En ce qui concerne les enregistrements pour plusieurs utilisateurs,
veuillez utiliser le fichier REGISTER.DOC, et multiplier le prix en
dollars par 5.8.
Merci d'utiliser ZDiff, et n'hésitez pas à le conseiller à vos amis
si vous l'appréciez. N'hésitez pas non plus à m'envoyer du courrier
en français !
Christophe Dubourg.